package me.zhengjie.modules.sync;

import lombok.extern.slf4j.Slf4j;
import me.zhengjie.modules.sync.processing.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Slf4j
@Service
@Deprecated
public class ProcessingService {
    @Autowired
    FirsthandEstateSyncProcessing firsthandEstateSyncProcessing;

    @Autowired
    PropertySyncProcessing propertySyncProcessing;

    @Autowired
    DistrictSyncProcessing districtSyncProcessing;

    @Autowired
    AreaSyncProcessing areaSyncProcessing;

    @Autowired
    EstateSyncProcessing estateSyncProcessing;

    @Autowired
    EstatePhotoSyncProcessing estatePhotoSyncProcessing;

    @Autowired
    DepartmentSyncProcessing departmentSyncProcessing;

    @Autowired
    EmployeeSyncProcessing employeeSyncProcessing;

    @Autowired
    PropertyVrSyncProcessing propertyVrSyncProcessing;

    @Autowired
    PropertyVideoSyncProcessing propertyVideoSyncProcessing;

    @Autowired
    PropertyContactSyncProcessing propertyContactSyncProcessing;

    public void processing() {
        //解析新房
        try {
            firsthandEstateSyncProcessing.run();
        } catch (Exception e) {
            log.error("firsthandEstateSyncProcessing error", e);
        }

        //区域
        try {
            districtSyncProcessing.run();
        } catch (Exception e) {
            log.error("districtSyncProcessing error", e);
        }

        //商圈
        try {
            areaSyncProcessing.run();
        } catch (Exception e) {
            log.error("areaSyncProcessing error", e);
        }
        //楼盘
        try {
            estateSyncProcessing.run();
        } catch (Exception e) {
            log.error("estateSyncProcessing error", e);
        }
        //楼盘图片
        try {
            estatePhotoSyncProcessing.run();
        } catch (Exception e) {
            log.error("estateSyncPhotoProcessing error", e);
        }
        //部门
        try {
            departmentSyncProcessing.run();
        } catch (Exception e) {
            log.error("departmentSyncProcessing error", e);
        }
        //经纪人
        try {
            employeeSyncProcessing.run();
        } catch (Exception e) {
            log.error("employeeSyncProcessing error", e);
        }

        //二手房
        try {
            propertySyncProcessing.run();
        } catch (Exception e) {
            log.error("propertySyncProcessing error", e);
        }

        try {
            propertyVrSyncProcessing.run();
        } catch (Exception e) {
            log.error("propertyVrSyncProcessing error", e);
        }

        try {
            propertyVideoSyncProcessing.run();
        } catch (Exception e) {
            log.error("propertyVideoSyncProcessing error", e);
        }

        try {
            propertyContactSyncProcessing.run();
        } catch (Exception e) {
            log.error("propertyContactSyncProcessing error", e);
        }
    }
}
